<?php
/**
 * Created by PhpStorm.
 *
 * Author : Traveler.
 * Time   : 2020/2/12 18:24
 * Company: Inner Mongolia Zhengzhi Network Technology Co., Ltd
 */

namespace app\admin\validate;


use think\Validate;

class Menu extends Validate
{
    /**
     * 当前验证规则
     * @var array
     */
    protected $rule = [
        'pid'        => 'require|integer',
        'name'       => 'require',
        'url'        => 'require',
    ];

    /**
     * 验证提示信息
     * @var array
     */
    protected $message = [
        'pid' => [
            'require' => '父级菜单不能为空',
            'integer'  => '父级菜单ID必须为整数',
        ],
        'name' => [
            'require' => '菜单名称不能为空',
        ],
        'url' => [
            'require' => '菜单地址不能为空',
        ],
    ];
}